'''
将列出下列数值的2进位，8进位，16进位的值
100 55 299 399 86
'''

# 第一题
a = 100
b = 55
c = 299
d = 399
e = 86
print("二进位",a,b,c,d,e,"=",bin(a),bin(b),bin(c),bin(d),bin(e))
print("八进位",a,b,c,d,e,"=",oct(a),oct(b),oct(c),oct(d),oct(e))
print("十六进位",a,b,c,d,e,"=",hex(a),hex(b),hex(c),hex(d),hex(e))

'''
将下列的数值转成10进制
0b11110010
0o76543
0xaaabbb
'''
a1 = 0b10110010
b1 = 0o76543
c1 = 0xaaabbb
print("十进制",int(a1),int(b1),int(c1))

'''
假设
a=10
b=18
c=5
计算下列结果，取整
'''
a=10
b=18
c=5
s = a + b - c
print(s)

s1 = 2* a + 3 -c
print(s1)

s2 = b * c + 20 /b
print(s2)

s3 = a % c * b + 10
print(s3)

s4 = a ** c -a * b * c
print(s4)